package cn.itsource.feign.client;

import cn.itsource.domain.Login;
import cn.itsource.dto.LoginMealDto;
import cn.itsource.feign.fallback.LoginFeignClientFallback;
import cn.itsource.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>描述</p>
 *
 * @author 波波老师(微信 ： javabobo0513)
 * @date 2022/11/9-15:13
 */
@FeignClient(value = "service-auth", fallbackFactory = LoginFeignClientFallback.class)
public interface LoginFeignClient {

    @PostMapping(value="/login/save")
    JSONResult save(@RequestBody Login login);

    /**
     * 保存数据到t_login_meal表中
     */
    @PostMapping(value="/login/saveLoginMeal")
    JSONResult saveLoginMeal(@RequestBody LoginMealDto dto);
}